﻿
If Exists(SELECT * FROM sys.objects o WHERE o.[object_id]= OBJECT_ID('V_ProductBrand') AND o.[type]=N'V')
BEGIN
	DROP VIEW V_ProductBrand
END
GO
	CREATE VIEW V_ProductBrand
	AS 
	SELECT A.ID,A.BrandGuid,B.Name,A.ProductCategoryID
	FROM ShopNum1_ProductCategoryAndProductBranDrelation A
	JOIN ShopNum1_Brand B on(A.BrandGuid=B.Guid)
	WHERE B.IsDeleted=0

